 



#import <UIKit/UIKit.h>
#import "DataObject.h"
#import "CorePlot-CocoaTouch.h"

@protocol TradeSystemDetailRecordDelgete;

@interface TradeSystemDetailRecord : UIViewController<UITableViewDelegate,UITableViewDataSource,CPTPlotDataSource,CPTPlotSpaceDelegate> {
	id <TradeSystemDetailRecordDelgete> delegate;	
    id delegate_UIPopoverController;     
    
	//損益表
	UIView *gainlossview;
	
	//損益表
	 //UIView *Chartview;	
	 
	CPTXYGraph * graph;	
	//CPLayerHostingView *Chartview;	
	CPTGraphHostingView *Chartview; 
    UIView *graphview;
	
	
	//交易記錄表	
	UITableView *myTable;
	
	UIPageControl *pageCtrl;
	
	BOOL showtradesystemSetUp;
	
	
	UISegmentedControl *segmetnctl;		
	
	//股票資料物件
	DataObject *stockdata;	
}

 
@property (nonatomic, assign) id <TradeSystemDetailRecordDelgete> delegate;
@property (nonatomic, assign) id delegate_UIPopoverController;

-(id)initWithTargetSymbol:(DataObject *)adataobject;
-(void)sowhidebuttonClicked;
-(void) segmentChanged:(id)sender;
-(void)gainlossShow;
-(void)gainlosssowhidebuttonClicked;
-(NSDecimalNumber *)turnNSDecimalNumber:(NSDecimalNumber *)inp;
-(NSDecimalNumber *)HighPrice:(NSString *)name;
-(NSDecimalNumber *)LowPrice:(NSString *)name;
-(NSString *)LableDateString:(int)Index;

@end


@protocol TradeSystemDetailRecordDelgete
- (void)TradeSystemDetailRecordDidFinish:(TradeSystemDetailRecord *)controller;


@end


